package com.competitions.videoedithelper.dao;

import com.competitions.videoedithelper.entity.NewVideo;
import com.competitions.videoedithelper.entity.VideoInfo;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Map;

/**
 * @author 盛旭雯
 */
@Repository
public interface NewVideoDao {
    /**
     * 插入新视频
     * @param newVideo 视频实例
     */
    void insertNewVideo(NewVideo newVideo);

    /**
     * 查找某视频的历史修改记录
     * @param initVideoId 原视频id
     * @return List
     */
    List<Map<String,Object>> selectVideos(@Param("initVideoId") int initVideoId);

    /**
     * 查找视频
     * @param videoId 视频Id
     * @return NewVideo
     */
    NewVideo selectVideo(@Param("videoId") int videoId);

    /**
     * 删除视频
     * @param videoId 视频id
     */
    void deleteVideo(@Param("videoId") int videoId);
}
